<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改表单推送信息')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-info-edit" th:object="${formInfo}">
            <input name="id" th:field="*{id}" type="hidden">
<!--            <div class="form-group">-->
<!--                <label class="col-sm-3 control-label">渠道类型：</label>-->
<!--                <div class="col-sm-8">-->
<!--                    <input name="channelName" th:field="*{channelType}" readonly="true" class="form-control" type="text">-->
<!--                </div>-->
<!--            </div>-->
            <div class="form-group">
                <label class="col-sm-3 control-label">渠道名称：</label>
                <div class="col-sm-8">
                    <input name="channelName" th:field="*{channelName}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">渠道类型：</label>
                <div class="col-sm-8">
                    <input name="type" th:field="*{type}" class="form-control" readonly type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">描述：</label>
                <div class="col-sm-8">
                    <input name="descInfo" th:field="*{descInfo}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">开始日期：</label>
                <div class="col-sm-8">
                    <input name="startDate" th:field="*{startDate}"  class="form-control" type="text" required autocomplete="off">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">开始时间：</label>
                <div class="col-sm-8">
                    <input name="startTime" th:field="*{startTime}"  class="form-control" type="text" required autocomplete="off">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">结束时间：</label>
                <div class="col-sm-8">
                    <input name="endTime" th:field="*{endTime}"  class="form-control" type="text" required autocomplete="off">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "form/info";
        $("#form-info-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-info-edit').serialize());
            }
        }

        layui.use('laydate', function(){
            var laydate = layui.laydate;

            laydate.render({
                elem: '#startTime',
                type: 'time'
            });

            laydate.render({
                elem: '#endTime',
                type: 'time'
            });

            laydate.render({
                elem: '#startDate',
                type: 'date'
            });

        });

    </script>
</body>
</html>